package com.gitee.luosl.cola.lang.function.checked;

import com.gitee.luosl.cola.lang.function.Consumer5;

public interface CheckedConsumer5<T1, T2, T3, T4, T5> {

    void accept(T1 t, T2 t2, T3 t3, T4 t4, T5 t5) throws Throwable;

    default Consumer5<T1, T2, T3, T4, T5> toConsumer() {
        return (t1, t2, t3, t4, t5) -> {
            try {
                accept(t1, t2, t3, t4, t5);
            } catch (Throwable throwable) {
                throw new CheckedException(throwable);
            }
        };
    }
}
